/**
 * 
 */
package com.training.exceptions;

import java.util.Scanner;

/**
 * @author vasu
 * 
 */
public class EmployeeTest {

	public static void main(String[] args) {

		EmployeeTest employeeTest = new EmployeeTest();
		Scanner scanner = new Scanner(System.in);

		int input = scanner.nextInt();

		int returnValue = 0;
		try {
			returnValue = employeeTest.validateUserInput(input);
		} catch (NegtiveNumberException nne) {
			System.out
					.println("NegtiveNumberException Catched , not going to exit program , " +
							"but continue with other statments");
		} catch (Exception e2) {
			System.out
			.println("Exception Catched , not going to exit program , " +
					"but continue with other statments");
		}

		System.out.println("User Entered -- " + returnValue);

	}

	public int validateUserInput(int inputValue) throws Exception,
			NegtiveNumberException {

		if (inputValue < 0) {

			throw new NegtiveNumberException();
		}

		if (inputValue < 10) {

			throw new Exception("Input Should be more than 10");
		}

		return inputValue;
	}

}
